#include <bits/stdc++.h>
using namespace std;
int countRoom(vector<pair<int, int>> &a) {
  int sum_result = 0, ans = 0;
  vector<pair<int, int>> tmp;
  int ret;
  for (auto i : a) {
    tmp.push_back({i.first, 1});
    tmp.push_back({i.second, -1});
  }
  sort(tmp.begin(), tmp.end());
  for (auto i : tmp) {
    sum_result += i.second;
    if (sum_result > ans) ans = sum_result;
  }
  return ans;
}
